]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Fix folder icons for RTL locales
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 20 Jun 2014 15:46:22 +0000 (17:46 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 24 Jun 2014 21:37:35 +0000 (23:37 +0200)
Unlike StTable, ClutterTableLayout does not take the actor's text
direction into account, so mirror columns ourselves now.

https://bugzilla.gnome.org/show_bug.cgi?id=731923

js/ui/appDisplay.js

index d4231290e2607db5d0d6898d819ad75d71931c67..b580ba38ee1d92628ee48e71961f1ced148ee5c9 100644 (file)
@@ -953,6 +953,7 @@ const FolderView = new Lang.Class({
         let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
 
         let numItems = this._allItems.length;
+        let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL;
         for (let i = 0; i < 4; i++) {
             let bin;
             if (i < numItems) {
@@ -961,7 +962,7 @@ const FolderView = new Lang.Class({
             } else {
                 bin = new St.Bin({ width: subSize, height: subSize });
             }
-            layout.pack(bin, i % 2, Math.floor(i / 2));
+            layout.pack(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2));
         }
 
         return icon;